from fulei import People


class Student(People):
    name = ''
    __age = 20  # 私有变量
    num = 0  # 类变量

    # 构造函数
    def __init__(self, name, age):
        self.name = name  # 实例变量
        self.age = age
        # print(name)  # 这打印的是传进来的参数
        # print(age)
        self.__class__.num += 1
        print("学生总数：" + str(self.__class__.num))

    def print_info(self):  # 实例方法
        print('name', self.name)
        print('age', self.age)

    @classmethod
    def add_num(cls):  # 类方法 操作类变量
        cls.num += 1
        print("总数为" + str(cls.num))

    @classmethod
    def __aa(cls):  # 私有类方法
        pass

    def __test(self):  # 私有实例方法
        pass

    @staticmethod
    def __haha():  # 私有静态方法
        pass

    @staticmethod
    def total(x, y):
        total = x + y
        print(total)

    def fulei_method(self):
        super(Student, self).bb()


student = Student('haha', 10)
student.add_num()
# Student.total(2, 4)
# student.total(3, 9)
# Student.__age = 30
# student1 = Student('haha1', 10)
# student2 = Student('haha2', 10)
# student3 = Student('haha3', 10)

# student.print_info()
# print(student.name)

student.fulei_method()
